from resources import resources

class resources_tests :
    'resources'
    def __init__ ( self , test ) :
        self . _test = test
        self . _storage = { }
        self . _resources = resources ( self . _storage )
    def test_get_resource ( self ) :
        self . _storage [ 'my first resource' ] = 'my first data'
        self . _storage [ 'my second resource' ] = 'my second data'
        self . _test . assume_equal ( self . _resources . get_resource ( 'my first resource' ) , 'my first data' )
        self . _test . assume_equal ( self . _resources . get_resource ( 'my second resource' ) , 'my second data' )
    def test_get_resource_unknown ( self ) :
        self . _test . assume_equal ( self . _resources . get_resource ( 'unknown resource' ) , None )
